<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.min.js"></script>
    <!-- 引入样式 组件库-->
    <link rel="stylesheet" href="../../element-ui/lib/theme-chalk/index.css">
    <script src="../../element-ui/lib/index.js"></script>
    <script type="text/javascript">
        var component = {
            template: '<div><p>{{name}}</p>' +
                '<p>{{propOne}}</p></div>',
            data: function () {
                return {name: '我是一个组件'}
            },
            props: {
                propOne: String
            },
            mounted: function () {
                console.log("component1 mounted");
            },
        };
    </script>
</head>
<body>
<div id="app">
</div>
</body>
<script>
    let ComponentVue = Vue.extend(component);
    new ComponentVue({
        el: "#app",
        propsData: {
            propOne: '传递数据'
        }
    })
</script>
</html>
